﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CSharpInheritTeach
{
    /// <summary>
    /// 父类：封装人的共性
    /// </summary>
    public class Person
    {
        public Person()
        {

        }

        public Person(string idNo,string name)
        {
            this.IdNo = idNo;
            this.Name = name;
        }

        public Person(string post)
        {
            this.post = post;
        }

        private string post;

        public string IdNo { get; set; }

        public string Name { get; set; }

        public string Gender { get; set; }

        protected string Address { get; set; }

        public void Dowork()
        {
            Console.WriteLine("我们每天都要工作");
        }

        public void Reset()
        {
            Console.WriteLine("下班后，我们要及时信息!");
        }

        protected void Have()
        {
            Console.WriteLine("每个人都要一日三餐");
        }

        public void GetPost()
        {
            Console.WriteLine("我的职位是：" + this.post);
        }
    }
}
